<template>
  <el-tag
    size="small"
    type="warning"
  >
    <div style="display:flex;justify-content:flex-start;align-items:center;">
      <div class="status">
        {{ getLabel('distribute_server_status',datas.disStatus) }}
      </div>
      <div
        v-if="datas.disStatus==='2'"
        class="flow-status"
      >
        <div v-if="datas.isDistributeServer">[ 无配送服务 ]</div>
        <div v-if="datas.isDistributeTerminal">[ 无配送终端 ]</div>
        <div v-if="datas.isChange">[ 变更审核中 ]</div>
        <div v-if="datas.isQualification">[ 资质审核中 ]</div>
      </div>
    </div>
  </el-tag>
</template>

<script>
import {computed, reactive, toRefs} from 'vue'

export default {
  props: {
    datas: {
      type: Object,
      default: () => {},
    },
  },
  setup(props, context) {
    var reactiveData = reactive({
      tagType: '',
    })
    reactiveData.tagType = computed(() => {
      var types = ''
      if (props.datas.flowStatus === 'DOING') {
        types = 'warning'
      } else {
        if (props.datas.disStatus !== '2') {
          types = 'warning'
        } else {
          types = 'success'
        }
      }
      return types
    })
    return {
      ...toRefs(reactiveData),
    }
  },
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>
